﻿//using System.Collections.Generic;

//namespace DriveManage.SocketClient
//{
//    public class SocketDeviceManager
//    {

//        public static Dictionary<int, ISocketConnection> SocketClients = new Dictionary<int, ISocketConnection>();

//        public void AddSocketDevice(int Key, ISocketConnection Connection)
//        {
//            SocketClients.Add(Key, Connection);
//            Connection.OnConnected += OnDeviceConnected;
//            Connection.OnFaildConnect += OnDeviceFailedConnect;
//            Connection.OnReceiveMsg += OnDeviceReceivedMsg;
//            Connection.OnConnectError += OnDeviceConnectError;
//        }

//        public void RemoveSocketDevice(int Key) {
//            if (SocketClients.ContainsKey(Key))
//            {
//                SocketClients.Remove(Key);
//            }
//        }

//        private void OnDeviceConnected(SocketClientManager scm)
//        {
//            // 处理设备连接成功逻辑
//        }

//        private void OnDeviceFailedConnect(SocketClientManager scm)
//        {
//            // 处理设备连接失败逻辑
//        }

//        private void OnDeviceReceivedMsg(SocketClientManager scm, string msg)
//        {
//            // 处理设备接收消息逻辑
//        }

//        private void OnDeviceConnectError(SocketClientManager scm, string err)
//        {
//            // 处理设备连接错误逻辑
//        }

//    }
//}
